package com.manlitech.manlichat.util.convert;

import com.manlitech.manlichat.dto.ChatMessage;
import com.manlitech.manlichat.pojo.nettywebsocket.ChatToOneMessage;
import com.manlitech.manlichat.pojo.nettywebsocket.SeeMessage;

import java.util.Date;

/**
 * @author shensg
 */
public class SeeMessageConvertToChatMessage {

    public static ChatMessage convert(SeeMessage seeMessage){
        ChatMessage chatMessage = new ChatMessage();
        chatMessage.setCreateTime(new Date());
        chatMessage.setFromId(seeMessage.getFromId());
        chatMessage.setToId(seeMessage.getToId());
        return chatMessage;
    }
}
